home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 19 / oaspro41.zip / SCL.DOC < prev    next >
Text File  |  1988-05-22  |  18KB  |  601 lines

  1. {$R-,S+,I+,D+,T-,F-,V-,B-,N-,L+ }
  2. {$M 16384,0,655360 }
  3.  
  4.  
  5. unit scl;
  6. interface
  7.  
  8.  
  9. uses dos,crt;
  10.  
  11. TYPE
  12.   string128    = string[128];
  13.   String80     = STRING[80];
  14.   String10     = STRING[10];
  15.   String20     = STRING[20];
  16.   String13     = STRING[13];
  17.   String40     = STRING[40];
  18.   String70     = STRING[70];
  19.  
  20. CONST
  21.  
  22. {Increase the following values if required}
  23.  
  24.   Max_Error_Messages          = 100; {max 100 recs in file ???.ERR}
  25.   Max_Input_Messages          = 400; {max 400 recs in file ???.MSG}
  26.   Max_Heap_Screens            = 20;  {max 20 formats in Mem simultaneously}
  27.  
  28.   Screenfile_Ext : string10     = '.scs';    {Change for other file name}
  29.   Indexfile_Ext  : string10     = '.sci';    {extensions}
  30.   Errorfile_Ext  : string10     = '.err';
  31.   Messagefile_Ext: string10     = '.msg';
  32.  
  33. {Help system }
  34.  
  35.   Code_Help_Field  : INTEGER  = 1060; {F2 Key to display field help screen}
  36.   Code_Help_Format : INTEGER  = 1059; {F1 Key to display format help screen}
  37.   Auto_Help_Set    : BOOLEAN  = TRUE; {Autohelp feature enabled}
  38.   Autohelp_Screen             = 'AUTOHELP'; {Name of autohelp format}
  39.   Maxerrors        : INTEGER  = 3;    {Display Autohelp after 3 consecutive
  40.                                        input errors.}
  41.  
  42. {Country information to be used by SCL; 0=Use System setting. Change if other
  43.  country code is to be used}
  44.  
  45. CONST
  46.   Scl_Country      : INTEGER = 0;
  47.  
  48. {Cursor wrap around feature; Set to TRUE if no wraparound is desired (Mouse) }
  49.  
  50. No_Wrap            : BOOLEAN  = FALSE;{Overrides format specs if TRUE}
  51.  
  52.  
  53. {Field blinker}
  54.  
  55.   Timer_Intervall  : INTEGER  = 3; {Increase for slower blinking fields}
  56.  
  57.  
  58. {Beep Sound}
  59.  
  60.   Beep_Off         : BOOLEAN  = FALSE;    {SCL beeps in case of input errors}
  61.   Beep_Time        : INTEGER  = 3;        {3 bursts of about 50 ms each}
  62.   Beep_Frequency_1 : INTEGER  = 200;      {First frequency  200 hertz}
  63.   Beep_Frequency_2 : INTEGER  = 350;      {Second frequency 350 hertz}
  64.  
  65. (*pointers to the background tasks; inilialized during 'Select_format_file'
  66.  to point to 'dummy' *)
  67.  
  68.   lp_background_pointer:pointer=nil;
  69.   hp_background_pointer:pointer=nil;
  70.  
  71. {Messages}
  72.  
  73.   Input_Msg_Set    : BOOLEAN  = TRUE;     {Input messages are not supressed}
  74.   Error_Msg_Set    : BOOLEAN  = TRUE;     {error messages are not supressed}
  75.  
  76.  
  77. {**************************************************************************}
  78. { NOTE:
  79.   All constants named 'Code...' define keyboard keys to perform certain
  80.   functions within SCL.
  81.   They are the ASCII Codes of the appropriate keys with 1000 added, if they
  82.   return a two byte (extended) code, starting with an ESC character.
  83.   Example: Code_F7. The F7 key returns a two byte code <ESC> 'A'.
  84.   Therefore it is coded as follows: 1000 + 65 = 1065. (65 is the ASCII Value
  85.   of 'A'.
  86.   (The same scheme applies to all character coding in SCL)
  87. ***************************************************************************}
  88.  
  89. {Characters to be used for the 'Marked field attribute'}
  90.  
  91.   Mark_Field_Left  : Byte     = 16; {ASCII 16}
  92.   Mark_Field_Right : Byte     = 17; {ASCII 17}
  93.  
  94. {Characters representing 'Yes' and 'No'. Used for boolean variables.
  95.  Change for other languages.}
  96.  
  97.   Code_Yes         : INTEGER  = 89;    {'Y'}
  98.   Code_No          : INTEGER  = 78;    {'N'}
  99.  
  100.  
  101. {Special Keys, change for non standard keyboard layouts}
  102.  
  103.   Code_Cancel_Act  : INTEGER  = 1061;  {F3 to cancel a field change}
  104.   Code_Abort       : INTEGER  = 1068;  {F10 to unconditionally abort a format}
  105.   Code_Escape      : INTEGER  = 27;
  106.   Code_Home        : INTEGER  = 1071;
  107.   Code_Tab         : INTEGER  = 9;
  108.   Code_Ctrltab     : INTEGER  = 1116;  {Internal use, don't change}
  109.   Code_Rtab        : INTEGER  = 1015;
  110.   Code_Return      : INTEGER  = 13;
  111.   Code_Left        : INTEGER  = 1075;
  112.   Code_Right       : INTEGER  = 1077;
  113.   Code_Down        : INTEGER  = 1080;
  114.   Code_Up          : INTEGER  = 1072;
  115.   Code_End         : INTEGER  = 1079;
  116.   Code_Ins         : INTEGER  = 1082;
  117.   Code_Del         : INTEGER  = 1083;
  118.   Code_Backspace   : INTEGER  = 8;
  119.   Code_Pgup        : INTEGER  = 1073;
  120.   Code_Pgdown      : INTEGER  = 1081;
  121.  
  122. {Codes for function keys}
  123.  
  124.   Code_F1          : INTEGER  = 1059;
  125.   Code_F2          : INTEGER  = 1060;
  126.   Code_F3          : INTEGER  = 1061;
  127.   Code_F4          : INTEGER  = 1062;
  128.   Code_F5          : INTEGER  = 1063;
  129.   Code_F6          : INTEGER  = 1064;
  130.   Code_F7          : INTEGER  = 1065;
  131.   Code_F8          : INTEGER  = 1066;
  132.   Code_F9          : INTEGER  = 1067;
  133.   Code_F10         : INTEGER  = 1068;
  134.  
  135. {'Do nothing' character. Don't change.}
  136.  
  137.   Code_Noop                   = 255;
  138.  
  139.  
  140. {Permitted characters for the different types of variables}
  141.  
  142.   Anything_Set     : SET OF byte = [1..6,8,14..27,32..254];
  143.   Integer_Set      : SET OF byte = [32,43,45,48..57];
  144.   Real_Set         : SET OF byte = [32,43,45,46,48..57];
  145.   Alpha_Set        : SET OF byte = [32,65..90,97..122,128..167];
  146.  
  147.  
  148. {Message to be displayed in case of fatal SCL error, change for other language}
  149.  
  150.   Fatal_Msg_1                 = 'FATAL ERROR IN SCREENHANDLER: ';
  151.   Fatal_Msg_2                 = 'ERROR NR: ';
  152.   Fatal_Msg_3                 = 'PROGRAM ABORTED.';
  153.  
  154.  
  155. {SCL internal Flags}
  156.  
  157.   format_aborted   : BOOLEAN  = FALSE;
  158.   Msgfile_Exists   : BOOLEAN  = FALSE;
  159.   Field_Inverted   : BOOLEAN  = TRUE;
  160.   Blink_count      : Integer  = 0;
  161.   beep_switch      : boolean  = true;
  162.   beep_count       : integer  = 0;
  163.  
  164. {System dependant info. Don't change}
  165.  
  166.   minint           : integer  = -32767;
  167.   Max_Format_Width            = 80;  {Max chars per line}
  168.   Max_Format_Height           = 25;  {Max lines on display}
  169.   Key_Buffer_Size             = 50;  {Type ahead buffer size}
  170.   Max_Format_Fields           = 50;  {Max 50 fields on a format}
  171.   Space            : CHAR     = ' '; {That's what a space looks like}
  172.   save_exitproc    : pointer  = nil;
  173.  
  174. TYPE
  175.  
  176.   Msgrec       = String70;
  177.   Fieldkinds   = (Variable,Textfield,Constant);
  178.   Contkinds    = (I,R,Alpha,Anything,Bool);
  179.   Position     = (Left,Right,Center);
  180.   Line         = STRING[Max_Format_Width];
  181.   Tenfunctions = ARRAY[1..10] OF BOOLEAN;
  182.   Tenchars     = ARRAY[1..10] OF INTEGER;
  183.   Linearray    = ARRAY[1..Max_Format_Height] OF Line;
  184.   Inputbuffer  = ARRAY[0..Key_Buffer_Size] OF INTEGER;
  185.  
  186.   Dta_Type     = RECORD
  187.                    Reserved : ARRAY[1..21] OF Byte;
  188.                    Attribute: Byte;
  189.                    Time, Date, Filesizelo, Filesizehi : INTEGER;
  190.                    Name : STRING[13];
  191.                  END;
  192.  
  193.   Fieldrec     = RECORD
  194.                   Field_Msg_Nr           :INTEGER; {ptr to rec in *.msg}
  195.                   Field_Help_Screen      :String10;{help screen for this field}
  196.                   Fx,                    {column where this field starts}
  197.                   Fy,                    {row of this field}
  198.                   Fl                     :Byte; {field length}
  199.                   Ld_Char                :CHAR; {the char for left delimiter}
  200.                   Rd_Char                :CHAR; {char for right delimiter}
  201.                   Next_Tab,              {the field to go to if tab is pressed}
  202.                   Prev_Tab,              {the field to go to if rtab is pressed}
  203.                   Look_Norm,             {char attribute byte}
  204.                   Look_Act_Color,        {char attribute byte}
  205.                   Look_Act_Mono,         {special coding, see above}
  206.                   Look_Sel_Color,        {char attribute byte}
  207.                   Look_Sel_Mono          :Byte;
  208.                   Inp_Required           :BOOLEAN;
  209.                   Field_Type             :Fieldkinds;
  210.                   Fill_Char              :CHAR;
  211.                   Check_Each_Char        :BOOLEAN;
  212.                   Cont_Type              :Contkinds;
  213.                   Justify                :Position;
  214.                   Cont_Min,
  215.                   Cont_Max               :REAL;
  216.                   Nr_Of_Dec,
  217.                   Group_First,
  218.                   Group_Last             :Byte;
  219.                   Selected,
  220.                   Highlighted            :BOOLEAN;
  221.                 END;
  222.   Fieldarray   = ARRAY[1..Max_Format_Fields] OF Fieldrec;
  223.   Screen       = RECORD
  224.                   Format_Status          :Byte;
  225.                   Screenname             :String10;
  226.                   Format_Help_Screen     :String10;
  227.                   F_Int                  :Tenfunctions;
  228.                   Char_Int               :Tenchars;
  229.                   Error_Field,
  230.                   Message_Field,
  231.                   Total_Fields,
  232.                   First_Tab,
  233.                   Last_Tab,
  234.                   Format_Width,
  235.                   Format_Height          :Byte;
  236.                   Abort_Ok,
  237.                   Wrap_Ok                :BOOLEAN;
  238.                   Spare                  :BOOLEAN;
  239.                   Format_Color           :Byte;
  240.                   Format_Image           :Linearray;
  241.                   Field                  :Fieldarray;
  242.                   Filler                 :ARRAY[1..119] OF Byte; {to get to 36*
  243.                                                                   128 bytes}
  244.                 END;
  245.  
  246.   Sckeyrec      = RECORD
  247.                    Deleted               :BOOLEAN;
  248.                    Scname                :String10;
  249.                    Sckey                 :INTEGER;
  250.                  END;
  251.   Screcptrtyp   = ^heapscreenrec;
  252.   Scstackrec    = RECORD
  253.                    Saved_Mx,
  254.                    Saved_My,
  255.                    Saved_Fn,
  256.                    Saved_Xoff,
  257.                    Saved_Yoff,
  258.                    Recovery_Left,
  259.                    Recovery_Right,
  260.                    Recovery_Top,
  261.                    Recovery_Bottom,
  262.                    Saved_Status,
  263.                    Saved_Char_Code,
  264.                    Saved_Err             :INTEGER;
  265.                    saved_fcs             :string80;
  266.                    Saved_Char_Image      :CHAR;
  267.                    saved_editmode,
  268.                    Saved_Char_Interrupt,
  269.                    Saved_Fieldend,
  270.                    Format_End            :BOOLEAN;
  271.                    Screc                 :Screcptrtyp;
  272.                  END;
  273.   Heapscreenrec  = Screen;
  274.   Scr_Pos        = RECORD
  275.                      Txt,
  276.                      Att  :Byte;
  277.                    END;
  278.   Scrmap         = ARRAY[1..25,1..80] OF Scr_Pos;
  279.   Scstacktyp     = ARRAY[1..Max_Heap_Screens] OF Scstackrec;
  280.   Msgptr         = ^msg;
  281.   Msg            = String70;
  282.  
  283. Var
  284.   Screen_Color_Translation_Table: Array[0..255] of Byte;    {screen att xlation}
  285.   Country,                            {contains country code used}
  286.   Date_Format   :INTEGER;             {0=mmddyy, 1=ddmmyy}
  287.   Date_Separator:CHAR;                {from country info}
  288.   Time_Separator:CHAR;                {from country info}
  289.   Currency      :String10;            {from country info}
  290.  
  291.   {above info is set during SCL init and can be inquired anytime}
  292.  
  293.   old_clock     : pointer;
  294.   Glb_regs      : registers;
  295.   Spaces        : String80;
  296.   Scmsg         : ARRAY [1..500] OF Msgptr;
  297.   Errorfile     : TEXT;
  298.   Msgfile       : FILE OF Msgrec;
  299.   Stack         : Scstacktyp;
  300.   Keyrec        : Sckeyrec;
  301.   Active_Format,
  302.   Active_Field  : INTEGER;
  303.   Screens       : FILE;
  304.   Screenindex   : FILE OF Sckeyrec;
  305.   Inbuff        : Inputbuffer;
  306.   Buffbot,
  307.   Bufftop       : INTEGER;
  308.   Editmode,
  309.   Mono_Adapter,
  310.   Fieldend      : BOOLEAN;
  311.   Progpath      : String80;
  312.   Stack_Debth,
  313.   Xoff,
  314.   Yoff,
  315.   Activeformat,
  316.   R_ptr,
  317.   W_ptr,
  318.   S_ptr,
  319.   Scmsgnr,
  320.   Errorcount    : INTEGER;
  321.   Char_Image    : CHAR;
  322.   Char_Code,
  323.   Mx,
  324.   My,
  325.   Glb_Status,
  326.   Glb_Error     : INTEGER;
  327.   Error_Msg_Present,
  328.   Msg_Present   : BOOLEAN;
  329.   Fieldcontsave : String80;
  330.   Active_Format_File
  331.                 : String10;
  332.   Checkrequired,
  333.   Glb_Ok,
  334.   user_function,
  335.   begin_of_field,
  336.   end_of_field,
  337.   end_of_format : BOOLEAN;
  338.   Newtime       : REAL;
  339.   Lasterror     : INTEGER;
  340.   Color_True    : BOOLEAN;
  341.   Screen_Mode   : byte;
  342.   Mscreen       : Scrmap Absolute $b000:$0000;
  343.   Cscreen       : Scrmap Absolute $b000:$8000;
  344.  
  345. (*Datacom related Declarations*)
  346.  
  347. CONST
  348.   Dc_Parity      : CHAR    = 'E';
  349.   Dc_Stopbits    : INTEGER = 1;
  350.   Dc_Speed       : INTEGER = 9600;
  351.   Dc_Charsize    : INTEGER = 7;
  352.   Dc_int_Save    : pointer = nil;
  353.   DC_Buffer_Size           = 2100;
  354.   DC_Rx_Buff_Bottom:INTEGER= 0;
  355.   DC_Rx_Buff_Top : INTEGER = 0;
  356.   Dc_Open        : BOOLEAN = FALSE;
  357.   Tx_Char_Timeout: INTEGER = 500;
  358.   Rts_Cts_Timeout: INTEGER = 500;
  359.   Rts_Holdover   : INTEGER = 0;
  360.   Rts_Cts_Delay  : INTEGER = 30;
  361.   Bcc_Set        : BOOLEAN = TRUE;
  362.  
  363. (*Datacom Control Characters*)
  364.  
  365.   Nul                      = $0;
  366.   Soh                      = $1;
  367.   Stx                      = $2;
  368.   Etx                      = $3;
  369.   Eot                      = $4;
  370.   Enq                      = $5;
  371.   Ack                      = $6;
  372.   Bel                      = $7;
  373.   Con                      = $7;
  374.   Bs                       = $8;
  375.   Ht                       = $9;
  376.   Lf                       = $a;
  377.   Vt                       = $b;
  378.   Ff                       = $c;
  379.   Cr                       = $d;
  380.   S0                       = $e;
  381.   S1                       = $f;
  382.   Dle                      = $10;
  383.   Dc1                      = $11;
  384.   Dc2                      = $12;
  385.   Dc3                      = $13;
  386.   Dc4                      = $14;
  387.   Nak                      = $15;
  388.   Syn                      = $16;
  389.   Etb                      = $17;
  390.   Can                      = $18;
  391.   Em                       = $19;
  392.   Sub                      = $1a;
  393.   Esc                      = $1b;
  394.   Fs                       = $1c;
  395.   Gs                       = $1d;
  396.   Rs                       = $1e;
  397.   Us                       = $1f;
  398.   Pol                      = $70;
  399.   Sel                      = $71;
  400.   Fsl                      = $73;
  401.   Bsl                      = $74;
  402.   Del                      = $7f;
  403.  
  404.  
  405. (*Datacom Receive Buffer*)
  406.  
  407. VAR
  408.   DC_Rx_Buffer   : ARRAY[0..DC_Buffer_Size] OF Byte;
  409.   Bcc            : Byte;
  410.  
  411.  
  412.  
  413. FUNCTION Capital(wstr: String): String;
  414. FUNCTION Stripleft(wstr: String): String;
  415. FUNCTION Stripright(wstr: String): String;
  416.  
  417. PROCEDURE Strip(VAR wstr:String;VAR Len:INTEGER);
  418.  
  419. FUNCTION Charstring(Whatchar:CHAR;Len:INTEGER):String;
  420.  
  421. PROCEDURE Ftab(VAR wstr:String;Fill_Char:CHAR;Just:Position;Len:INTEGER);
  422.  
  423. FUNCTION Justify_Left(STR:String;Len:INTEGER):String;
  424.  
  425. FUNCTION Justify_Right(STR:String;Len:INTEGER):String;
  426.  
  427. FUNCTION Justify_Center(STR:String;Len:INTEGER):String;
  428.  
  429. PROCEDURE Frontstring(STR:String;VAR Head,Tail:String);
  430.  
  431. FUNCTION X_Max:INTEGER;
  432.  
  433. FUNCTION Y_Max:INTEGER;
  434.  
  435. FUNCTION St(I:INTEGER):String80;
  436.  
  437. FUNCTION Nr(St:String80):Integer;
  438.  
  439. FUNCTION RSt(R:real; Decimals:INTEGER):String80;
  440.  
  441. FUNCTION RNr(S:String):real;
  442.  
  443. Function Power(Mantissa, Exponent:Real):Real;
  444.  
  445. PROCEDURE Get_Screen_Mode;
  446.  
  447. PROCEDURE Get_Country;
  448.  
  449. PROCEDURE Cursor(Top,Bottom:Byte);
  450.  
  451. PROCEDURE Cursor_Off;
  452.  
  453. Procedure Reset_Screen_Colors;
  454.  
  455. Procedure Change_Color(Oldattr,NewAttr:Byte);
  456.  
  457. Function Get_Current_Color(Attr:Byte):Byte;
  458.  
  459. PROCEDURE Set_Edit_Mode(Yes:BOOLEAN);
  460.  
  461. PROCEDURE Set_Att(X,Y:INTEGER;Color:Byte);
  462.  
  463. PROCEDURE Dc(X,Y,Charcode:Byte);
  464.  
  465. PROCEDURE Draw_Char(Charcode:Byte);
  466.  
  467. PROCEDURE Set_Screen_Color(Color:Byte);
  468.  
  469. PROCEDURE Set_Field_Color(Fieldnr:INTEGER;Color:Byte);
  470.  
  471. function format_name:string80;
  472.  
  473. FUNCTION Get_Att(X,Y:INTEGER):Byte;
  474.  
  475. PROCEDURE Paint_Format_Frame(Color:Byte);
  476.  
  477. PROCEDURE Set_Mx(Value:INTEGER);
  478.  
  479. PROCEDURE Set_My(Value:INTEGER);
  480.  
  481. FUNCTION Exist(Fn : String80):BOOLEAN;
  482.  
  483. FUNCTION Date_String(Y,M,D:word):String10;
  484.  
  485. FUNCTION Time_String(H,M,S:word):String10;
  486.  
  487. PROCEDURE Check_Time(VAR Time_Str:String10;VAR H,M,S:word);
  488.  
  489. PROCEDURE Check_Date(VAR Date_Str:String10;VAR Y,M,D:word);
  490.  
  491. FUNCTION Weekday(Y,M,D:word):word;
  492.  
  493. FUNCTION Julian_Date(VAR Y,M,D:word):REAL;
  494.  
  495. Procedure Normal_Date(Julian:REAL;VAR Y,M,D:word);
  496.  
  497. FUNCTION Date:String10;
  498.  
  499. FUNCTION Time(Seconds:BOOLEAN):String10;
  500.  
  501. FUNCTION Environment(Env_Name:String128):String128;
  502.  
  503. PROCEDURE Execute(Progstring:String128);
  504.  
  505. PROCEDURE ExecuteDos(Command:String128);
  506.  
  507. FUNCTION Next_Char(VAR Esc:BOOLEAN):CHAR;
  508.  
  509. FUNCTION Rtime:REAL;
  510.  
  511. PROCEDURE Beep;
  512.  
  513. PROCEDURE Fatal_Scl_Error(Errornr:INTEGER);
  514.  
  515. PROCEDURE W_Crt(Fieldnr:INTEGER;Msg:String80);
  516.  
  517. FUNCTION Sys_Msg(Nr:INTEGER):String80;
  518.  
  519. PROCEDURE Input_Error(Msgnr:INTEGER);
  520.  
  521. PROCEDURE R_Cont(Fieldnr:INTEGER;VAR Contents:String80);
  522.  
  523. PROCEDURE R_Sel(Fieldnr:INTEGER; VAR Sel:BOOLEAN);
  524.  
  525. FUNCTION G_Cont(Fn:INTEGER):String80;
  526.  
  527. FUNCTION G_Sel(Fn:INTEGER):BOOLEAN;
  528.  
  529. PROCEDURE Finish_Format(Check:BOOLEAN);
  530.  
  531. PROCEDURE Close_Formats;
  532.  
  533. PROCEDURE Select_Format_File(Filename:String10);
  534.  
  535. PROCEDURE Blank_Format;
  536.  
  537. PROCEDURE Select_Format(Fname:String10);
  538.  
  539. PROCEDURE Get_Next_Char(VAR Charnumber:INTEGER ; VAR Inputchar:CHAR);
  540.  
  541. PROCEDURE W_Cont(Fieldnr:INTEGER;Cont:String80);
  542.  
  543. PROCEDURE W_Sel(Fieldnr:INTEGER;Sel:BOOLEAN);
  544.  
  545. PROCEDURE C_Cont(Fieldnr:INTEGER);
  546.  
  547. FUNCTION Format_Done:BOOLEAN;
  548.  
  549. PROCEDURE Goto_Field(Fn:INTEGER);
  550.  
  551. PROCEDURE Display_Format(Xoffset,Yoffset:INTEGER);
  552.  
  553. PROCEDURE Handle_Format;
  554.  
  555. (*   --------Datacom Routines-----------   *)
  556. PROCEDURE Clear_Rx_Buffer;
  557.  
  558. PROCEDURE Set_Dc_Params;
  559.  
  560. PROCEDURE Get_Dc_Status(VAR Status:INTEGER);
  561.  
  562. PROCEDURE Dc_Break;
  563.  
  564. FUNCTION Cts:BOOLEAN;
  565.  
  566. FUNCTION Dsr:BOOLEAN;
  567.  
  568. FUNCTION Ri:BOOLEAN;
  569.  
  570. PROCEDURE Set_Rts(On:BOOLEAN);
  571.  
  572. PROCEDURE Set_Dtr(On:BOOLEAN);
  573.  
  574. PROCEDURE Enable_Port;
  575.  
  576. PROCEDURE Disable_Port;
  577.  
  578. PROCEDURE Dc_Diagnose(On:BOOLEAN);
  579.  
  580. PROCEDURE Close_Dc;
  581.  
  582. PROCEDURE Open_Dc(VAR Result:INTEGER);
  583.  
  584. PROCEDURE Dc_Write(Code:Byte;VAR Ok:BOOLEAN);
  585.  
  586. FUNCTION Tx_Ok:BOOLEAN;
  587.  
  588. PROCEDURE Send_Char(Code:Byte;var Ok:BOOLEAN);
  589.  
  590. PROCEDURE Send_String(Data:String;VAR Ok:BOOLEAN);
  591.  
  592. PROCEDURE Send_Buffer(VAR Tx_Buff;Buff_Start,Buff_Length,Bcc_add:INTEGER;
  593.                                        Head:string;VAR Ok:BOOLEAN);
  594. PROCEDURE Receive_Char(VAR Code:INTEGER;VAR Ok:BOOLEAN);
  595.  
  596.  
  597.  
  598. implementation
  599.  
  600.  
  601.